package com.service;

import com.Imp.UserMapperImpl;
import com.entity.User;
import com.mapper.UserMapper;

import java.io.IOException;

public class LoginService {
    private UserMapper userMapper = new UserMapperImpl();
    public int login(User user) throws IOException {
        // 处理登录逻辑
        User at = null;
        at = userMapper.getUserByUsername(user.getUserName());
        if(at == null){
            return 0;//未找到信息
        }
        else{
            return 1;//找到信息
        }

    }
}
